Optimal. Leaf size=266 \[ \frac{(a+b x)^{m+1} (c+d x)^n \left (\frac{b (c+d x)}{b c-a d}\right )^{-n} \, _2F_1\left (m+1,-n;m+2;-\frac{d (a+b x)}{b c-a d}\right ) \left (a^2 d^2 f h (n+1) (n+2)+a b d (n+1) (2 c f h (m+1)-d (m+n+3) (e h+f g))+b^2 \left (c^2 f h (m+1) (m+2)-c d (m+1) (m+n+3) (e h+f g)+d^2 e g (m+n+2) (m+n+3)\right )\right )}{b^3 d^2 (m+1) (m+n+2) (m+n+3)}-\frac{(a+b x)^{m+1} (c+d x)^{n+1} (a d f h (n+2)+b c f h (m+2)-b d (m+n+3) (e h+f g)-b d f h x (m+n+2))}{b^2 d^2 (m+n+2) (m+n+3)} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.496005, antiderivative size = 266, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.12 \[ \frac{(a+b x)^{m+1} (c+d x)^n \left (\frac{b (c+d x)}{b c-a d}\right )^{-n} \, _2F_1\left (m+1,-n;m+2;-\frac{d (a+b x)}{b c-a d}\right ) \left (a^2 d^2 f h (n+1) (n+2)+a b d (n+1) (2 c f h (m+1)-d (m+n+3) (e h+f g))+b^2 \left (c^2 f h (m+1) (m+2)-c d (m+1) (m+n+3) (e h+f g)+d^2 e g (m+n+2) (m+n+3)\right )\right )}{b^3 d^2 (m+1) (m+n+2) (m+n+3)}-\frac{(a+b x)^{m+1} (c+d x)^{n+1} (a d f h (n+2)+b c f h (m+2)-b d (m+n+3) (e h+f g)-b d f h x (m+n+2))}{b^2 d^2 (m+n+2) (m+n+3)} \]
Antiderivative was successfully verified.
[In] Int[(a + b*x)^m*(c + d*x)^n*(e + f*x)*(g + h*x),x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 152.063, size = 257, normalized size = 0.97 \[ \frac{\left (a + b x\right )^{m + 1} \left (c + d x\right )^{n + 1} \left (- a d f h \left (n + 2\right ) - b c f h \left (m + 2\right ) + b d f h x \left (m + n + 2\right ) + b d \left (e h + f g\right ) \left (m + n + 3\right )\right )}{b^{2} d^{2} \left (m + n + 2\right ) \left (m + n + 3\right )} - \frac{\left (\frac{b \left (- c - d x\right )}{a d - b c}\right )^{- n} \left (a + b x\right )^{m + 1} \left (c + d x\right )^{n} \left (- a^{2} d^{2} f h \left (n + 1\right ) \left (n + 2\right ) + a b d \left (n + 1\right ) \left (- 2 c f h \left (m + 1\right ) + d \left (e h + f g\right ) \left (m + n + 3\right )\right ) + b^{2} \left (- c^{2} f h \left (m + 1\right ) \left (m + 2\right ) + c d \left (m + 1\right ) \left (e h + f g\right ) \left (m + n + 3\right ) - d^{2} e g \left (m + n + 2\right ) \left (m + n + 3\right )\right )\right ){{}_{2}F_{1}\left (\begin{matrix} - n, m + 1 \\ m + 2 \end{matrix}\middle |{\frac{d \left (a + b x\right )}{a d - b c}} \right )}}{b^{3} d^{2} \left (m + 1\right ) \left (m + n + 2\right ) \left (m + n + 3\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((b*x+a)**m*(d*x+c)**n*(f*x+e)*(h*x+g),x)
[Out]
_______________________________________________________________________________________
Mathematica [C] time = 1.83066, size = 335, normalized size = 1.26 \[ \frac{1}{3} (a+b x)^m (c+d x)^n \left (\frac{9 a c x^2 (e h+f g) F_1\left (2;-m,-n;3;-\frac{b x}{a},-\frac{d x}{c}\right )}{2 \left (3 a c F_1\left (2;-m,-n;3;-\frac{b x}{a},-\frac{d x}{c}\right )+b c m x F_1\left (3;1-m,-n;4;-\frac{b x}{a},-\frac{d x}{c}\right )+a d n x F_1\left (3;-m,1-n;4;-\frac{b x}{a},-\frac{d x}{c}\right )\right )}+\frac{4 a c f h x^3 F_1\left (3;-m,-n;4;-\frac{b x}{a},-\frac{d x}{c}\right )}{4 a c F_1\left (3;-m,-n;4;-\frac{b x}{a},-\frac{d x}{c}\right )+b c m x F_1\left (4;1-m,-n;5;-\frac{b x}{a},-\frac{d x}{c}\right )+a d n x F_1\left (4;-m,1-n;5;-\frac{b x}{a},-\frac{d x}{c}\right )}+\frac{3 e g (c+d x) \left (\frac{d (a+b x)}{a d-b c}\right )^{-m} \, _2F_1\left (-m,n+1;n+2;\frac{b (c+d x)}{b c-a d}\right )}{d (n+1)}\right ) \]
Warning: Unable to verify antiderivative.
[In] Integrate[(a + b*x)^m*(c + d*x)^n*(e + f*x)*(g + h*x),x]
[Out]
_______________________________________________________________________________________
Maple [F] time = 0.093, size = 0, normalized size = 0. \[ \int \left ( bx+a \right ) ^{m} \left ( dx+c \right ) ^{n} \left ( fx+e \right ) \left ( hx+g \right ) \, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((b*x+a)^m*(d*x+c)^n*(f*x+e)*(h*x+g),x)
[Out]
_______________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \[ \int{\left (f x + e\right )}{\left (h x + g\right )}{\left (b x + a\right )}^{m}{\left (d x + c\right )}^{n}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((f*x + e)*(h*x + g)*(b*x + a)^m*(d*x + c)^n,x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \[{\rm integral}\left ({\left (f h x^{2} + e g +{\left (f g + e h\right )} x\right )}{\left (b x + a\right )}^{m}{\left (d x + c\right )}^{n}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((f*x + e)*(h*x + g)*(b*x + a)^m*(d*x + c)^n,x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x+a)**m*(d*x+c)**n*(f*x+e)*(h*x+g),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [F] time = 0., size = 0, normalized size = 0. \[ \int{\left (f x + e\right )}{\left (h x + g\right )}{\left (b x + a\right )}^{m}{\left (d x + c\right )}^{n}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((f*x + e)*(h*x + g)*(b*x + a)^m*(d*x + c)^n,x, algorithm="giac")
[Out]